package com.sy.musicapp.intent.network

import com.sy.musicapp.Util
import okhttp3.Interceptor
import okhttp3.Request
import okhttp3.Response

/**
 * OkHttp发送拦截器
 * @author SY
 * @since 2022-02-19 23:59
 **/
class OkHttpSendInterceptor : Interceptor {


    override fun intercept(chain: Interceptor.Chain): Response {
        val builder: Request.Builder = chain.request().newBuilder();
        try {
            Util.showLog(chain.request().url().url().toString(),"SENDURL")
        } catch (e: Exception) {
            e.printStackTrace()
        }
        return chain.proceed(builder.build());
    }
}